package alex.web.controller;

import alex.mysql.repository.PageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.security.Principal;

/**
 * Created by lushun.chen on 2017/4/24.
 *
 * @author lushun.chen
 */
@Controller
@RequestMapping("/page")
public class PageController {
    @Autowired
    private PageRepository pageRepository;

    @RequestMapping("/index")
    public String findAll(ModelMap model, Principal user) {
        pageRepository.findAll();
        return null;
    }

}
